<html>
    <head>
        <script src="modules.js"></script>
    </head>
    <body>
        <input id="commandBox" type="input" style="width: 100%; margin-top: 1.5em;"/>
        <script>
        this.require('base.js', function (base) {
        this.require('xml.js', function (xml) {
        this.require('message_buffer.js', function (messageBuffer) {
        this.require('command_box.js', function (commandBox) {
        base.initializer(function () {

            var bodyElement = document.getElementsByTagName('body')[0];
            messageBuffer.init(bodyElement);

            var commandBoxElement = xml.$('commandBox');
            commandBox.init(commandBoxElement);

            var print = bodyElement.output;

            commandBoxElement.output = function (command) {
                print('<p>&gt;&gt;&gt;&nbsp;<b>' + js.inoculate(command) + '</b></p>');
                try {
                    print(js.inoculate(js.string(eval(command))));
                } catch (exception) {
                    print(js.inoculate(js.string(exception)));
                }
            };

        })(); /* initializer */
        }); /* require */
        }); /* require */
        }); /* require */
        }); /* require */
        </script>
    </body>
</html>
